home *** CD-ROM | disk | FTP | other *** search
- #include "ExternalInterface.h"
-
- /*
- This trivial extension shows the use of NewDocument(),
- Allocate(), and SetWindowContents().
- */
-
- pascal void main(ExternalCallbackBlock *callbacks, WindowPtr w)
- {
- Handle h;
-
- w = callbacks->NewDocument();
- if (w) {
- h = callbacks->Allocate(0, FALSE);
- SetIText(h, "\pHello World");
- callbacks->SetWindowContents(w, h);
- // do NOT dispose of "h", since it now belongs to the window!
- }
- }
-